import java.util.ArrayList;

public class Shop4S {

    private final static ArrayList<ICar> carList = new ArrayList<ICar>();
    private final static ArrayList<ICar> financeCarList = new ArrayList<ICar>();
    // 使用static代码块模拟数据初始化操作
    static {
        carList.add(new BenzCar("梅赛德斯-迈巴赫S级轿车",138));
        carList.add(new BenzCar("梅赛德斯-AMG S 63 L 4MATIC+", 230));
        carList.add(new BenzCar("梅赛德斯-奔驰V级", 50));
        financeCarList.add(new FinanceBenzCar("梅赛德斯-迈巴赫S级轿车",138));
        financeCarList.add(new FinanceBenzCar("梅赛德斯-AMG S 63 L 4MATIC+", 230));
        financeCarList.add(new FinanceBenzCar("梅赛德斯-奔驰V级", 50));
    }

    public static void main(String[] args) {
        System.out.println("4s店售车记录（不含金融服务费）:");
        for (ICar car: carList){
            System.out.println("车名：" + car.getName() + "\t价格：" + car.getPrice() + "万元");
        }
        System.out.println("\n4s店售车记录（包含金融服务费）:");
        for (ICar car: financeCarList) {
            System.out.println("车名：" + car.getName() + "\t价格：" + car.getPrice() + "万元");
        }
    }

}
